package com.cg.controller;

import com.cg.client.AppClient;
import com.cg.dto.Result;
import com.cg.entity.Divide;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName DivideController
 * @Description TODO
 * @Author CG
 * @Date 2024/1/7 12:42
 **/
@RestController
@RequestMapping("/divide")
public class DivideController {

    @Resource
    private AppClient appClient;

    /**
     * 根据科室id查询对应的科别信息
     */
    @GetMapping("/queryDivideByDepartmentId")
    public Result<List<Divide>> queryDivideByDepartmentId(Integer departmentId){
        return appClient.queryDivideByDepartmentId(departmentId);
    }
}
